using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SAE.Forms
{
    public partial class OpenSiteDialog : Form
    {
        public string URL
        {
            get
            {
                return this.txtSiteUrl.Text;
            }
            set
            {
                this.txtSiteUrl.Text = value;
            }
        }

        public OpenSiteDialog()
        {
            InitializeComponent();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            if (this.txtSiteUrl.Text.Trim().Length > 0 && this.txtSiteUrl.Text.StartsWith("http://"))
            {
                this.DialogResult = DialogResult.OK;

                this.Close();
            }
            else
            {
                this.labError.Visible = true;
            }
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;

            this.Close();
        }
    }
}